<%@ page import="cqcvc.edu.cn.service.ApplicationLoadData" %>
<%@ page import="cqcvc.edu.cn.entity.MemberInfo" %><%--
  Created by IntelliJ IDEA.
  User: zhouyz
  Date: 2022/12/27
  Time: 8:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<link rel="stylesheet" href="css/bootstrap.min.css">
<link rel="stylesheet" href="css/web.css">
<script src="js/jquery.js"></script>
<script src="js/bootstrap.min.js"></script>
<%
    request.setCharacterEncoding("utf-8");
    ApplicationLoadData.Init(application);
%>
<div class="nav">
    <a href="#" style="text-decoration: none">
        <div>
            <img src="images/logo.png" class="logo" width="50px">
            &nbsp;&nbsp;
            <img src="images/banner.png" class="banner">
        </div>
    </a>
    <div class="tag">
        <div>
            <span class="glyphicon glyphicon-phone">联系电话</span>
        </div>
        <div id="login-btn" >
            <span id="span" class="glyphicon glyphicon-user">会员登录</span>
        </div>
        <div id="quit">
            <span id="quit-span">退出</span>
        </div>
    </div>
</div>
<div class="title" >
    <a href="index.jsp"><div>首 页</div></a>
    <a href="about.jsp"><div>关于我们</div></a>
    <a href="activity.jsp"><div>套餐及活动</div></a>
    <a href="service.jsp"><div>专业服务</div></a>
    <a href="org.jsp"><div>企业团队</div></a>
    <a href="house.jsp"><div>房间介绍</div></a>
    <a href="job.jsp"><div>招贤纳士</div></a>
</div>



<script>
    //$('#span').text("zhangsan")
</script>
<%
    MemberInfo memberInfo =(MemberInfo)session.getAttribute("memberInfo");
    if(memberInfo!=null)
    {
        out.println("<script> $('#span').text('"+memberInfo.getMemName()+"');</script>");
    }
    else
    {
        out.println("<script> $('#span').text('会员登录');</script>");
    }
%>


<script type="text/javascript">
    $('#login-btn').click(function () {
        if($('#span').text() == "会员登录"){
            window.location.href='login'
        }else {
            location.href='userInfo';
        }
    })
    $('#quit').click(function (){
        if($('#span').text() != "会员登录") {
            window.location.href='quit'
        }
    })
</script>
